package io.renren.modules.sys.controller;


import io.renren.common.utils.R;
import io.renren.common.config.ConstantConfig;
import io.renren.modules.sys.service.TestService;
import io.renren.common.utils.Jdpush;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("api/aaa")
public class TestController {

    @Autowired
    TestService service;

    @Autowired
    JPushController controller;

    @PostMapping("bbb")
    public R getUserName() {


      /*  Map<String,String> map1 = new HashMap<>();
        map1.put(ConstantConfig.ALIAS,map.get("aaa"));
        map1.put(ConstantConfig.ALERT,map.get("bbb"));


        controller.jiguangPush(map1);*/


       // JpushClientUtil.sendToAll("aaa","bbb","ccc","dddd");

       // JpushClientUtil.sendToAllAndroid("aaa","bbb","ccc","dddd");
        List<String> strings = new ArrayList<>();
        strings.add("100028");

       // Jdpush.sendTAagsPush(ConstantConfig.APP_KEY,ConstantConfig.MASTER_SECRET,"hahahah",strings,new HashMap<>());


        Jdpush.sendAliasPush(ConstantConfig.APP_KEY,ConstantConfig.MASTER_SECRET,100001+"","呵呵呵呵",new HashMap<>());



        return R.ok("查询成功", 100).put("data", "aaaaaaa");


    }


}
